package com.example.mybatis.sqlserver.springbootmybatissqlserver.pojo.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created by hzy on 2019/2/19.
 *
 * sample:
 *
 * {
 *   "ParentCategoryId": "sample string 1",
 *   "CategoryName": "sample string 2",
 *   "SortIndex": "sample string 3",
 *   "OnlyCode": "sample string 4"
 * }
 */

public class AddCategoryDTO {

    /**
     * 为空,则代表一级类目
     */
    @JsonProperty("ParentCategoryId")
    public String parentCategoryId;

    @NotNull
    @NotBlank
    @JsonProperty("CategoryName")
    public String categoryName;

    @NotNull
    @NotBlank
    @JsonProperty("SortIndex")
    public String sortIndex;


    /**
     * 例如: 10, 1010 , 112710w
     */
    @NotNull
    @NotBlank
    @JsonProperty("OnlyCode")
    public String onlyCode;
}
